package com.itheima.book.manager.entry;

import com.itheima.book.manager.controller.BaseBookController;
import com.itheima.book.manager.controller.BookController;
import com.itheima.book.manager.controller.BookController2;

import java.util.Random;

public class BookManagerEntry {
    public static void main(String[] args) {
//        BookController bookController = new BookController();
//        bookController.start();
        getBookController().start();

    }

    public static BaseBookController getBookController(){

        Random random = new Random();
        int nextInt = random.nextInt(2);

        if (nextInt == 0){
            return new BookController();
        } else {
            return new BookController2();
        }
    }
}
